# Creating a new Project Template Expense Budget

Adds an expense budget to a project template.
**Bulk Create**
This endpoint supports bulk creating up to 100 objects. In the request body, set the top-level key to its plural form and place the objects in an array. Example:

```
{
  "project_template_expense_budgets": [
    {
      "project_template_id": 123,
      "title": "Expense",
      "billable": true,
      "burns_budget": true,
      "fixed_fee": false,
      "cost_per_unit_in_subunits": 10000,
      "markup_type": "percentage",
      "markup_percentage": 10,
      "quantity": 1
    },
    {
      "project_template_id": 123,
      "title": "Expense 2",
      "billable": true,
      "burns_budget": true,
      "fixed_fee": false,
      "cost_per_unit_in_subunits": 20000,
      "markup_type": "percentage",
      "markup_percentage": 10,
      "quantity": 1
    }
  ]
}
```
This endpoint returns structured Project Template Expense Budget objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the `results` array
and will be indexed by ID in the `project_template_expense_budgets` top-level JSON key.
Please see our [Response Format](#section/Response-Format) section for more information.

Endpoint: POST /project_template_expense_budgets
Version: 1.0.0

## Query parameters:

  - `include` (string)
    Any of the below associations can be included in your request by providing the `include` param, e.g. `include=association1,association2`.
- `project_template` (ProjectTemplate) - Retrieves the template the expense budget is on. The response will include `project_template_id`,
which references the data in the `project_templates` top-level key.

## Request fields (application/json):

  - `project_template_expense_budget` (object)

  - `project_template_expense_budget.project_template_id` (integer, required)
    The ID of the template to add the expense budget to.

  - `project_template_expense_budget.title` (string, required)
    The name of the expense budget.

  - `project_template_expense_budget.description` (string)
    The description of the expense budget.

  - `project_template_expense_budget.billable` (boolean, required)
    Whether the expense will be billed to the client.

  - `project_template_expense_budget.burns_budget` (boolean, required)
    Whether the expense budget impacts the project margin.

  - `project_template_expense_budget.fixed_fee` (boolean, required)
    Whether the expense will be billed as a fixed cost.

  - `project_template_expense_budget.cost_per_unit_in_subunits` (integer)
    The cost, in the subunits of the currency (e.g. cents for USD).

  - `project_template_expense_budget.markup_type` (string)
    The markup type. Possible values are `percentage` and `flat_fee`.

  - `project_template_expense_budget.markup_per_unit_in_subunits` (integer)
    The markup per unit, in the subunits of the currency (e.g. cents for USD).

  - `project_template_expense_budget.markup_percentage` (number)
    If the `markup_type` is `percentage`, this is the markup percentage to apply to the expenses.

  - `project_template_expense_budget.quantity` (integer)
    The number of expected units for the expense budget.

  - `project_template_expense_budget.relative_expected_by_date` (integer)
    When the expenses are expected to be logged, relative to the project’s start date.
You can provide a negative value to indicate expenses are expected before the
project’s start date.

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 401 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 403 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 404 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 422 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 503 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

